﻿#if NETCore
using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Authentication.Cookies;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using System.Threading.Tasks;

namespace Longbow.Web.Controller
{
    [Route("api/[controller]")]
    [ApiController]
    [AllowAnonymous]
    public class LogoutController : ControllerBase
    {
        [HttpGet]
        public async Task<ActionResult> Get()
        {
            await HttpContext.SignOutAsync(CookieAuthenticationDefaults.AuthenticationScheme);
            return Content("Ok");
        }
    }
}
#endif